package com.isesol.ime.service;

import com.isesol.arch.common.service.*;
import com.isesol.ime.dal.model.dto.*;
import lombok.extern.slf4j.*;
import org.springframework.stereotype.*;

@Component
@Slf4j
public class LoginService  extends BaseService{

	public LoginResult login(LoginDTO loginDTO){

		LoginResult result = new LoginResult();

		if (loginDTO.getAccount().equals("Admin")&&loginDTO.getPassword().equals("123")){

			result.setCompCode("SESOL");
			result.setError(false);
			result.setLoginAccount(loginDTO.getAccount());
			result.setMemberCode("SESOL-Admin");
			result.setMemberName("管理员");
			result.setToken("1");
			result.setLoginType("T07");
			result.setSuccess(true);

			return result;

		}
		result.setSuccess(false);
		result.setError(true);
		return result;

	}

}
